package org.jeecg.modules.quartz.job;

import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.pointcount.redis.consumer.SendAndStorageProcess;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Author yw
 * @Date 2021/3/13 9:24
 */
@Slf4j
public class RedisTheardMoneyDataJob implements Job {

    @Autowired
    private SendAndStorageProcess sendAndStorageProcess;

    /**
     * 若参数变量名修改 QuartzJobController中也需对应修改
     */
    private String parameter;

    public void setParameter(String parameter) {
        this.parameter = parameter;
    }

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        sendAndStorageProcess.getMessage(parameter,5);
    }


}
